
<template>
 <div class="top-bar">
    <el-button type="primary" size="small" @click="changePage('pre')">上一页</el-button>
    <el-button type="primary" size="small" @click="changePage('next')">下一页</el-button>
    <el-button type="primary" size="small">添加文字</el-button>
    <el-button type="primary" size="small">标注</el-button>
    <el-button type="primary" size="small">画框</el-button>
    <span>1/{{ totalPage }}</span>
 </div>
<PdfMark :page="page" @getPageTotal="getPageTotal"/>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import PdfMark from '../components/pdfMark/index.vue'
const page = ref(1)
const totalPage = ref(0)
// 将总页数赋值
const getPageTotal = (val:number)=>{
    totalPage.value = val
}
const changePage = (val:string)=>{
    if(val == 'next'){
        page.value++
    }else{
        page.value--
    }
}
</script>
<style scoped lang="less">

</style>
